<?php
namespace app\blog\model;

use think\Model;

class Users extends Model
{
	protected $autoWriteTimestamp = true;

	/**
	 *
     */
	public function login()
	{
		$userInfo = $this->data;
		$login_counts = $userInfo['login_counts']+1;
		$this->login_counts = $login_counts;
		$this->save();
		session('userInfo',$userInfo);
		return session('userInfo.id');
	}



}